package com.tool_stdy;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @auther: cc.ly
 * @date: 2019/1/2/002
 */

public class TesMap {
    static Map<String, String> maps = Maps.newConcurrentMap();

    public static void testAd(String key) {
        String s = maps.putIfAbsent(key, "==1" + key);
        String s2 = maps.putIfAbsent(key, "==2" + key);
        System.out.println(s + "==" + s2);
    }

    public static void main(String[] args) {
        testAd("test_key");
    }
}
